<template>
  <div class="content">
    <el-dialog
      title="详情"
      :visible="dialogVisible"
      width="50%"
      :before-close="handleClose">
      <div v-if="info.receiveType==1">
        <el-row :gutter="20">
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              领取方式：<span>上门自取</span>
            </div>
          </el-col>
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              领取地址：<span>{{info.receiveAddress}}</span>
            </div>
          </el-col>
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              联系电话：<span>{{info.receivePhone}}</span>
            </div>
          </el-col>
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              领取时间：<span>{{info.receiveTime}}</span>
            </div>
          </el-col>
        </el-row>
      </div>
      <div v-if="info.receiveType==2">
        <el-row :gutter="20">
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              领取方式：<span>快递</span>
            </div>
          </el-col>
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              联系人：<span>{{info.expName}}</span>
            </div>
          </el-col>
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              联系电话：<span>{{info.expPhone}}</span>
            </div>
          </el-col>
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              地址：<span>{{info.expProvince}}{{info.expCity}}{{info.expArea}}</span>
            </div>
          </el-col>
          <el-col :span="8" :offset="2">
            <div class="grid-content bg-purple">
              详情地址：<span>{{info.expAddress}}</span>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-dialog>
  </div>
</template>
<script>
//  import waves from "@/directive/waves"; // Waves directive
  export default {
    name: 'receiveInfo',
//    directives: {waves},
    data() {
      return {
        dialogVisible: false,
        info: {
          receiveTyp: null,
          receiveAddress: null,
          receivePhone: null,
          receiveTime: null,
          expName: null,
          expPhone: null,
          expProvince: null,
          expCity: null,
          expArea: null,
          expAddress: null,
        },
      }
    },
    created() {
    },
    filters: {},
    methods: {
      handleClose(done) {
        this.dialogVisible = false;
      },
      //给父组件调用的方法
      parentRefMethod(info){
        this.info = info;
        console.log(this.info)
        this.dialogVisible = true;
      }
    }
  }
</script>
<style scoped>
</style>
